package org.rever.string;

public class ReverseSen {


	public String[] reversString(String str){
		String[] str1 =new String[str.length()];
		String[] s1;
		for (int i = 0; i < str1.length; i++) {
			s1 = str.split(" ");
			int j = (str1.length)-(s1.length);
			for (int j2 = 0; j2 < s1.length; j2++) {
				str1[j] = s1[j2];

			}
		}
		return str1;
                                                                                                                                                                                                                                                                                                        
	}
public void arrayprint(String[] string){
	String s = null ;
	for (int i = 0; i < string.length; i++) {
		s = string[i];
		System.out.println(s);
	}
	
	
	
}

	public static void main(String[] args) {
		ReverseSen rv = new ReverseSen();
		String[] st = rv.reversString("My name is durga");
		rv.arrayprint(st);

	}

}
